﻿
using System;
using Orchard.Localization;
using Whatsnexx.Services;
using Orchard.Logging;

namespace Whatsnexx.Rules{

    public class TicketBusActions : PublishingActions, IActionProvider
    {
        public TicketBusActions(ITicketBusService publishingService): base(publishingService)
        {
            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }

        public Localizer T { get; set; }
        public ILogger Logger { get; set; }

        public void Describe(dynamic describe){
            Func<dynamic, LocalizedString> display = context => T("Send an event");

            describe.For("Whatsnexx", T("Whatsnexx"), T("Whatsnexx"))
                .Element("SendEvent", T("Send an event to Whatsnexx Ticket Bus"), T("Send an event to a subject."), (Func<dynamic, bool>)SendEvent, display, "ActionSendEvent");
        }

       

       
    }
}
